#ifndef FLIP_LUA_FLIP_INTERNAL_H
#define FLIP_LUA_FLIP_INTERNAL_H

#include "flip.h"

#include "lauxlib.h"
#include "lualib.h"
#include "luajit.h"

#include "../gl/window.h"
#include "../2d/draw.h"


typedef struct luaflip_data_
{
	flip_window* current_window;
	flip_draw_buffer draw_buffer;
} luaflip_data;


static luaflip_data* global_data(lua_State* L)
{
	return (luaflip_data*)lua_touserdata(L, lua_upvalueindex(1));
}

#endif // FLIP_LUA_FLIP_INTERNAL_H
